1
2
3
4 package joeq.ClassLib.sun142_win32;
5
6 import java.util.Collections;
7 import java.util.Iterator;
8 import joeq.Class.PrimordialClassLoader;
9 import joeq.Class.jq_Class;
10 import joeq.ClassLib.ClassLibInterface;
11 import joeq.Runtime.ObjectTraverser;
12 import jwutil.collections.AppendIterator;
13
14
15
16
17
18 public class Interface extends joeq.ClassLib.sun14_win32.Interface {
19
20 /*** Creates new Interface */
21 public Interface() {}
22
23 public Iterator getImplementationClassDescs(joeq.UTF.Utf8 desc) {
24 if (ClassLibInterface.USE_JOEQ_CLASSLIB && desc.toString().startsWith("Ljava/")) {
25 joeq.UTF.Utf8 u = joeq.UTF.Utf8.get("Ljoeq/ClassLib/sun142_win32/"+desc.toString().substring(1));
26 return new AppendIterator(super.getImplementationClassDescs(desc),
27 Collections.singleton(u).iterator());
28 }
29 return super.getImplementationClassDescs(desc);
30 }
31
32 public ObjectTraverser getObjectTraverser() {
33 return sun142_win32ObjectTraverser.INSTANCE;
34 }
35
36 public static class sun142_win32ObjectTraverser extends sun14_win32ObjectTraverser {
37 public static sun142_win32ObjectTraverser INSTANCE = new sun142_win32ObjectTraverser();
38 protected sun142_win32ObjectTraverser() {}
39 public void initialize() {
40 super.initialize();
41
42 jq_Class k;
43 try {
44 k = (jq_Class) PrimordialClassLoader.loader.getOrCreateBSType("Ljoeq/ClassLib/Common/java/util/zip/DeflaterHuffman;");
45 k.load();
46 } catch (NoClassDefFoundError _) {
47 System.err.println("Error preloading DeflaterHuffman class");
48 }
49
50
51 k = (jq_Class) PrimordialClassLoader.loader.getOrCreateBSType("Ljava/io/ObjectInputStream$GetFieldImpl;");
52 k.load();
53
54
55 k = (jq_Class) PrimordialClassLoader.getJavaLangClass();
56 nullInstanceFields.add(k.getOrCreateInstanceField("name", "Ljava/lang/String;"));
57
58
59 k = (jq_Class) PrimordialClassLoader.loader.getOrCreateBSType("Ljava/io/Win32FileSystem;");
60 nullInstanceFields.add(k.getOrCreateInstanceField("cache", "Ljava/io/ExpiringCache;"));
61 nullInstanceFields.add(k.getOrCreateInstanceField("prefixCache", "Ljava/io/ExpiringCache;"));
62
63
64 k = (jq_Class) PrimordialClassLoader.loader.getOrCreateBSType("Ljava/io/ExpiringCache;");
65 k.load();
66 k = (jq_Class) PrimordialClassLoader.loader.getOrCreateBSType("Ljava/io/ExpiringCache$Entry;");
67 }
68 }
69 }